package com.syh.jn.scm.domain.supplier.entity.finance.archive;

import com.syh.core.ddd.domain.AbstractSimpleAggregate;
import com.syh.jn.scm.dto.supplier.statistics.stock.InventoryReportVo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * Created by soci.song on 2019/3/1.
 */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class ArchiveStock extends AbstractSimpleAggregate<Long> {

  public ArchiveStock(InventoryReportVo vo) {
    this.goodsId = vo.getGoodsId();
    this.depotId = vo.getDepotId();
    this.totalQuantity = vo.getTotalQuantity();
    this.totalAvgCost = vo.getTotalAvgCost();
    this.totalBalance = vo.getTotalBalance();
    this.beginningQuantity = vo.getBeginningQuantity();
    this.beginningAvgCost = vo.getBeginningAvgCost();
    this.beginningBalance = vo.getBeginningBalance();
    this.recordQuantity = vo.getRecordQuantity();
    this.recordAvgCost = vo.getRecordAvgCost();
    this.recordBalance = vo.getRecordBalance();
    this.purchaseQuantity = vo.getPurQuantity();
    this.purchaseAmount = vo.getPurAmount();
    this.purchaseReturnQuantity = vo.getPurRetQuantity();
    this.purchaseReturnAmount = vo.getPurRetAmount();
    this.saleQuantity = vo.getSaleQuantity();
    this.saleAmount = vo.getSaleAmount();
    this.saleReturnQuantity = vo.getSaleRetQuantity();
    this.saleReturnAmount = vo.getSaleRetAmount();
    this.otherInQuantity = vo.getOtherInQuantity();
    this.otherInAmount = vo.getOtherInAmount();
    this.otherOutQuantity = vo.getOtherOutQuantity();
    this.otherOutAmount = vo.getOtherOutAmount();
    this.spillQuantity = vo.getSpillQuantity();
    this.spillAmount = vo.getSpillAmount();
    this.lossQuantity = vo.getLossQuantity();
    this.lossAmount = vo.getLossAmount();
    this.saleLossQuantity = vo.getSaleLossQuantity();
    this.saleLossAmount = vo.getSaleLossAmount();
    this.saleReturnLossQuantity = vo.getSaleRetLossQuantity();
    this.saleReturnLossAmount = vo.getSaleRetLossAmount();
    this.purchaseLossQuantity = vo.getPurLossQuantity();
    this.purchaseLossAmount = vo.getPurLossAmount();
    this.purchaseReturnLossQuantity = vo.getPurRetLossQuantity();
    this.purchaseReturnLossAmount = vo.getPurRetLossAmount();
    this.otherLossQuantity = vo.getOtherLossQuantity();
    this.otherLossAmount = vo.getOtherLossAmount();
    this.saleSpillQuantity = vo.getSaleSpillQuantity();
    this.saleSpillAmount = vo.getSaleSpillAmount();
    this.saleReturnSpillQuantity = vo.getSaleRetSpillQuantity();
    this.saleReturnSpillAmount = vo.getSaleRetSpillAmount();
    this.purchaseSpillQuantity = vo.getPurSpillQuantity();
    this.purchaseSpillAmount = vo.getPurSpillAmount();
    this.purchaseReturnSpillQuantity = vo.getPurRetSpillQuantity();
    this.purchaseReturnSpillAmount = vo.getPurRetSpillAmount();
    this.otherSpillQuantity = vo.getOtherSpillQuantity();
    this.otherSpillAmount = vo.getOtherSpillAmount();
  }

  /**
   * 主表id
   */
  private Long archiveId;
  /**
   * 仓库id
   */
  private Long depotId;
  /**
   * 商品id
   */
  private Long goodsId;
  /**
   * 库存数量
   */
  private BigDecimal totalQuantity;
  /**
   * 平均成本
   */
  private BigDecimal totalAvgCost;
  /**
   * 库存余额
   */
  private BigDecimal totalBalance;
  /**
   * 期初数量
   */
  private BigDecimal beginningQuantity;
  /**
   * 期初均价
   */
  private BigDecimal beginningAvgCost;
  /**
   * 期初余额
   */
  private BigDecimal beginningBalance;
  /**
   * 本期数量
   */
  private BigDecimal recordQuantity;
  /**
   * 本期均价
   */
  private BigDecimal recordAvgCost;
  /**
   * 本期余额
   */
  private BigDecimal recordBalance;
  /**
   * 采购数量
   */
  private BigDecimal purchaseQuantity;
  /**
   * 采购总额
   */
  private BigDecimal purchaseAmount;
  /**
   * 采购退货数量
   */
  private BigDecimal purchaseReturnQuantity;
  /**
   * 采购退货数量
   */
  private BigDecimal purchaseReturnAmount;
  /**
   * 销售数量
   */
  private BigDecimal saleQuantity;
  /**
   * 销售总额
   */
  private BigDecimal saleAmount;
  /**
   * 销售退货数量
   */
  private BigDecimal saleReturnQuantity;
  /**
   * 销售退货总额
   */
  private BigDecimal saleReturnAmount;
  /**
   * 其他入库数量
   */
  private BigDecimal otherInQuantity;
  /**
   * 其他入库总额
   */
  private BigDecimal otherInAmount;
  /**
   * 其他出库数量
   */
  private BigDecimal otherOutQuantity;
  /**
   * 其他出库数量
   */
  private BigDecimal otherOutAmount;
  /**
   * 报溢数量
   */
  private BigDecimal spillQuantity;
  /**
   * 报溢数量
   */
  private BigDecimal spillAmount;
  /**
   * 报损数量
   */
  private BigDecimal lossQuantity;
  /**
   * 报损总额
   */
  private BigDecimal lossAmount;
  /**
   * 销售报损数量
   */
  private BigDecimal saleLossQuantity;
  /**
   * 销售报损总额
   */
  private BigDecimal saleLossAmount;
  /**
   * 销售退货报损数量
   */
  private BigDecimal saleReturnLossQuantity;
  /**
   * 销售退货报损总额
   */
  private BigDecimal saleReturnLossAmount;
  /**
   * 采购报损数量
   */
  private BigDecimal purchaseLossQuantity;
  /**
   * 采购报损总额
   */
  private BigDecimal purchaseLossAmount;
  /**
   * 采购退货报损数量
   */
  private BigDecimal purchaseReturnLossQuantity;
  /**
   * 采购退货报损总额
   */
  private BigDecimal purchaseReturnLossAmount;
  /**
   * 其他报损数量
   */
  private BigDecimal otherLossQuantity;
  /**
   * 其他报损总额
   */
  private BigDecimal otherLossAmount;
  /**
   * 销售报溢数量
   */
  private BigDecimal saleSpillQuantity;
  /**
   * 销售报溢总额
   */
  private BigDecimal saleSpillAmount;
  /**
   * 销售退货报溢数量
   */
  private BigDecimal saleReturnSpillQuantity;
  /**
   * 销售退货报溢总额
   */
  private BigDecimal saleReturnSpillAmount;
  /**
   * 采购报溢数量
   */
  private BigDecimal purchaseSpillQuantity;
  /**
   * 采购报溢总额
   */
  private BigDecimal purchaseSpillAmount;
  /**
   * 采购退货报溢数量
   */
  private BigDecimal purchaseReturnSpillQuantity;
  /**
   * 采购退货报溢总额
   */
  private BigDecimal purchaseReturnSpillAmount;
  /**
   * 其他报溢数量
   */
  private BigDecimal otherSpillQuantity;
  /**
   * 其他报溢总额
   */
  private BigDecimal otherSpillAmount;
}
